package com.starlink.model.dtomapper;

import com.starlink.model.domain.AddressDO;
import com.starlink.model.request.AddressRequest;
import com.starlink.model.vo.AddressVO;
import org.mapstruct.Mapper;
import org.mapstruct.factory.Mappers;

/**
 * @author zhanghong
 */
@Mapper(componentModel = "spring")
public interface AddressDtoMapper {

    AddressDtoMapper INSTANCE = Mappers.getMapper(AddressDtoMapper.class);

    /**
    * DO to VO
    * @param addressDO
    * @return
    */
    AddressVO do2VO(AddressDO addressDO);

    /**
     * request to DO
     * @param request
     * @return
     */
    AddressDO request2DO(AddressRequest request);
}
